import { logout, getUserInfo, isAuthenticated } from '../utils/auth' import {
useRouter } from 'vue-router' import { computed } from 'vue' // 获取路由实例
const router = useRouter() // 用户信息 const userInfo = computed(() =>
getUserInfo()) // 检查用户是否已登录 const isLoggedIn = computed(() =>
isAuthenticated()) // 用户登出 const handleLogout = () => {
logout('您已成功退出登录', router) }
